package com.wkbb.common.enums;

/**
 * @author luowenyan
 */
public enum FileTypeEnum {
    /**
     * 图片
     */
    PICTURE(1,"图片"),
    /**
     * 视频
     */
    VIDEO(2,"视频"),
    /**
     * 语音
     */
    VOICE(3,"语音");

    private FileTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (FileTypeEnum fileType : FileTypeEnum.values()) {
            if (fileType.getValue().intValue()==value) {
                return fileType.getDesc();
            }
        }
        return null;
    }
}
